package command

// Command 命令接口
type Command interface {
	Execute()
}

//具体实现

type OnCommand struct {
	device Device
}

func (c *OnCommand) Execute() {
	c.device.ON()
}

type OffCommand struct {
	device Device
}

func (c *OffCommand) Execute() {
	c.device.OFF()
}
